﻿@model FShare.ViewModels.DownloadViewModel

@{
    ViewBag.Title = "Download";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Your download will be available in few seconds</h2>

<div class="file-general-info">
    <p>File name: <span class="file-info">@Model.DownloadFileName</span></p>
    <p>Size: <span class="file-info">@(Model.DownloadFileSize / 1024 <= (1024 * 1024) 
                                        ? (Model.DownloadFileSize / 1024).ToString("0.##") + " KB." 
                                        : (Model.DownloadFileSize / 1024 / 1024).ToString("0.##") + " MB.")</span></p>
    <p>Downloaded: <span class="file-info">@Model.DownloadsCount</span> times.</p>
    <p>Date uploaded: <span class="file-info">@Model.DateUploaded.ToShortDateString()</span></p>

    <center>
        @Html.ActionLink("Download", "DownloadFile", new { id = Model.DownloadSecret }, new Dictionary<string, string> { { "class", "download-link" } })
    </center>
</div>
